﻿
CREATE proc sp_suaPT
@MaPT int,
@TenPT nvarchar(200),
@DVT nvarchar(50)
as
declare @dem as int
select @dem=count(*) from DanhMucPT where MaPT=@MaPT
if(@dem>0)
	begin
	Update DanhMucPT
	set TenPT=@TenPT,DVT=@DVT
	where MaPT=@MaPT
	select ErrCode=1
	end
else
	begin
	select ErrCode=0
	end